﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UpdatePayMent.aspx.cs" Inherits="Hospital_UpdatePayMent" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>修改回款单</title>
    <script language="javascript" src="../common/javascript/calendar.js" type="text/javascript"></script>
    <script language="vbscript" src="../common/yz.vbs" type="text/vbscript"></script>
     <link href="../styles/css.css" rel="stylesheet" type="text/css">
   
    <script language="javascript">
     function Sel_PS()
     {
          var project;
          project=<%=BulidPayHospitalId%>;
          window.open('hos_company_choose.aspx?Accountid_YY='+project);
     }
      function Sel_PS1()
     {
         
          var Accountid_PS;
          usercode=document.all("Accountid_PS").value;
          window.open('hospital_update_Receiptid.aspx?Accountid_PS='+usercode);
     }
     function confirmvalue_PS1(obj)
     {
         document.all("Receiptid").value=obj.Receiptid+","+document.all("Receiptid").value;
     }
     function confirmvalue_PS(obj)
     {
          
          document.getElementById("txtCompanyName_PS").value = obj.companyName;
           document.all("AccountId_PS").value =obj.companyid;
           
         
           
         
     }
    </script>
    <script language="javascript">
    function CheckDate()
    {
         var StartDate,EndDate;
         StartDate=document.all("txtPaymentStartDate").value;
         EndDate=document.all("txtPaymentEndDate").value;
         if(StartDate>EndDate)
         {
         window.alert('开始时间不能大于结束时间');
         return false;
         }
         return true;
    }
    </script>
</head>
<body>
 <form id="form1" runat=server>
        <div>
            <table width="98%" border="0" cellpadding="0" cellspacing="0" >
                <tr>
                    <td style="width: 4px">
                        <img src="../images/intro_left.gif" width="4" height="34"></td>
                    <td class="intro_wordbg">
                        修改结算单</td>
                    <td background="../images/intro_bg.gif">
                        <img src="../images/intro_right.jpg" width="118" height="34"></td>
                </tr>
            </table>
            <table width="98%" id="tabData" border="0" align="center" cellpadding="2" cellspacing="1"
            class="table_table2">
                <tr>
                    <td align="right" class="table_td3" style="border-width=0">
                        结算单名称：</td>
                    <td colspan="4"class="table_td2">
                        <asp:TextBox ID="txtPaymentName" runat="server" Width="337px" NotNull="结算单名称"></asp:TextBox><span style="color: #ff0000">(*)</span>
                        <span style="color: #ff0000"></span>
                    </td>
                </tr>
                <tr>
                    <td align="right" class="table_td3">
                        配送企业：</td>
                    <td colspan="4" style="height: 26px" class="table_td2">
             

<asp:TextBox ID="txtCompanyName_PS" runat="server" name="txtCompanyName_PS" Width="337px"  size="48" > </asp:TextBox>
                       
                        &nbsp<input id="Button1" style="width: 89px" type="button" value="选择配送企业" class="button_bg6" onclick ='document.getElementById("txttotalMoney").value="" ;document.getElementById("Receiptid").value="" ;document.getElementById("txttotalMoney").value="" ;Sel_PS()' />
                        <input id="Hidden1" type="hidden" name="AccountId_PS" value="<%=Request.Form["AccountId_PS"] %>" style="width: 45px" />
                        &nbsp;
                        <span style="color: #ff0000">(*)</span> 
                        <font color=blue>企业一定要选择，即使是同样的</font>
                        <asp:HiddenField ID="HiddenField1" runat="server" />
                        <span
                            style="color: #ff0000"></span></td>
                </tr>
                <tr>
                    <td align="right" class="table_td3">
                       发票号：</td>
                    <td colspan="4" style="height: 26px" class="table_td2">
<%--                       <input type="text" name="Receiptid" value="<%=Request.Form["Receiptid"] %>" Width="337px" NotNull="配送企业" size="48" readonly="readOnly">
--%>                        
                        <asp:TextBox ID="Receiptid" runat="server" name="Receiptid" Width="337px"  size="48" ReadOnly=true > </asp:TextBox>

                        &nbsp<input id="Button3" style="width: 89px" type="button" value="发票号" class="button_bg6" onclick ='document.getElementById("Receiptid").value="";document.getElementById("txttotalMoney").value="" ;document.getElementById("txttotalMoney").value="" ; Sel_PS1()' />
                       
                        <span style="color: #ff0000">(*)</span> 
                        <asp:HiddenField ID="HiddenField2" runat="server" />
                        <span
                            style="color: #ff0000"></span></td>
                </tr>
                
                
               <%-- <tr>
                    <td align="right" class="table_td3">
                        结算开始时间：</td>
                    <td colspan="2"  class="table_td2">
                        <asp:TextBox ID="txtPaymentStartDate" runat="server"  NotNull="结算开始时间" DateTimeOnly="结算开始时间" InvertedComma="结算开始时间" onclick="javascript:fPopCalendar(this,this);" dataType="Date" format="ymd" require="true"></asp:TextBox><span style="color: #ff0000">(*)</span>
                        <span style="color: #ff0000"></span>
                    </td>
                    <td colspan="1" class="table_td3">
                        结算结束时间：</td>
                    <td colspan="1" class="table_td2">
                        <asp:TextBox ID="txtPaymentEndDate" runat="server"  NotNull="结算结束时间" DateTimeOnly="结算结束时间" InvertedComma="结算结束时间" onclick="javascript:fPopCalendar(this,this);" dataType="Date" format="ymd" require="true"></asp:TextBox><span
                            style="color: #ff0000">(*)</span>&nbsp; <span style="color: #ff0000"></span><span
                            style="color: #ff0000"></span></td>
                </tr>--%>
                <tr>
                    <td align="right" class="table_td3" style="height: 26px">
                    </td>
                    <td colspan="4" class="table_td2" style="height: 26px">
                       <asp:TextBox ID="txttotalMoney" runat="server" ReadOnly="True"></asp:TextBox>（元）
                        <asp:Button ID="Button2" runat="server" Text="交易金额" class="button_bg8" Width="117px" OnClick="Button2_Click" OnClientClick="javascript:return CheckDate();" /></td>
                </tr>
                <tr>
                    <td align="right" class="table_td3">
                        配送药品信息</td>
                    <td colspan="4" class="table_td2">
                        <asp:GridView ID="GridView1" runat="server">
                        </asp:GridView>
                        
                    </td>
                </tr>
                <tr>
                    <td align="right" class="table_td3">
                        结算备注：</td>
                    <td colspan="4" class="table_td2">
                        <asp:TextBox ID="txtPaymentMemo" runat="server" Height="176px" TextMode="MultiLine"
                            InvertedComma="结算备注" Width="90%"></asp:TextBox></td>
                </tr>
                <tr>
                    <td align="right" style="height: 20px" class="table_td3">
                    </td>
                    <td style="height: 20px" class="table_td3">
                        <asp:Button ID="ButAdd" runat="server" Text="保　存" OnClick="ButAdd_Click" OnClientClick="javascript:return CheckForm();return CheckDate();" CssClass="button_bg4" Width="71px"  />
                        </td>
                    <td colspan="3" style="height: 20px" class="table_td3">
                        <asp:Button ID="btnClose" runat="server" Text="关  闭" OnClick="btnClose_Click" CssClass="button_bg" Width="59px" /></td>
                </tr>
            </table>
        </div>
 
           </form>  
</body>
</html>
